<head><meta http-equiv="refresh" content="3; url=http://localhost/hotel/admin/register/custom.html"></head>
<?php 
	header('Content-type: text/html; charset=utf-8');
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "root";
$mysql_database = "db_shop";

$name = $_POST['name'];$gender = $_POST['sex'];$age=$_POST['age'];$document_type=$_POST['type'];$document_id=$_POST['docu_id'];
$member_id=$_POST['member'];$check_time=$_POST['checktime'];$check_out_time=$_POST['outtime'];$check_num=$_POST['number'];
$room_id=$_POST['id'];$room_cost=$_POST['cost'];$deposit=$_POST['deposit'];$enjoy_benefits = $_POST['benefits'];
$conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
$sql = "INSERT INTO `hotel`.`custom` (`name`,`gender`, `age`,document_type,`document_id`, `member_id`, `check_time`,`check_out_time`, `check_num`, `room_id`, `room_cost`, `deposit`,enjoy_benefits) VALUES ('$name','$gender', '$age','$document_type', '$document_id', '$member_id', '$check_time', '$check_out_time', '$check_num', '$room_id', '$room_cost', '$deposit','$enjoy_benefits')";
   mysql_query ("set names 'utf8'");
    mysql_select_db($mysql_database);
   $result=mysql_query($sql);
   if($result == "")
   echo "出现错误,添加失败";
    else
	{
    echo '添加信息成功';
    }
?>
